package net.lulihu.common_util.jdbc.model;

import lombok.Data;

import java.util.Map;

/**
 * 模板参数
 */
@Data
public class TemplateParam {

    /**
     * sql命令
     */
    private String sqlStatement;

    /**
     * 占位符替换参数
     */
    private Object[] params;

    /**
     * 返回值类型
     */
    private Class<?> resultClass;

    /**
     * bean 属性与数据库表结构映射
     */
    private Map<String, String> propertyMapping;

    public TemplateParam(String sqlStatement, Object[] params) {
        this.sqlStatement = sqlStatement;
        this.params = params;
    }

    public TemplateParam(String sqlStatement, Object[] params, Class<?> resultClass) {
        this.sqlStatement = sqlStatement;
        this.params = params;
        this.resultClass = resultClass;
    }
}
